package org.bookie.framework.components;

import java.text.SimpleDateFormat;

import org.apache.tapestry.event.PageBeginRenderListener;
import org.apache.tapestry.event.PageEvent;

/**
 * Component to insert a formated date. 
 * 
 * @author Igor Drobiazko
 */
public abstract class InsertDate extends CommonInsert implements PageBeginRenderListener {
	/**Pattern describing the date and time format*/
	public static final String PATTERN = "d MMM yyyy HH:mm:ss";
	
	/**
	 * @see org.apache.tapestry.event.PageBeginRenderListener#pageBeginRender(org.apache.tapestry.event.PageEvent)
	 */
	public void pageBeginRender(PageEvent event){
		setFormat(new SimpleDateFormat(InsertDate.PATTERN));
	}


}
